package com.mzj.saas.rent;


import com.haixiaoke.saas.repository.core.AjaxResult;
import com.haixiaoke.saas.repository.service.IMetroLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 地铁线路Controller
 */
@RestController
@RequestMapping("/base/metro")
public class MetroController {

    @Autowired
    private IMetroLineService metroService;

    /**
     * 级联组件数据
     * @param cityId 城市id
     */
    @GetMapping("/comboList")
    public AjaxResult selectLinesByCityId(Long cityId) {
        return AjaxResult.success(metroService.selectLinesByCityId(cityId));
    }
}
